#include <iostream>
#include <stack>
using namespace std;

template<class T>
bool Matching(stack<T>& s) {
    char c = 0;
    while (-1 != (c = cin.get())) {
        if (c == '(' || c == '[') {
            s.push(c);
        }
        else if (c == ')') {
            if (s.top() != '(')return false;
            s.pop();
        }
        else if (c == ']') {
            if (s.top() != '[')return false;
            s.pop();
        }
    }
    return s.empty();
}

int main() {
    stack<char> s;
    if (Matching(s)) {
        cout << "Correct";
    }
    else {
        cout << "Wrong";
    }
    return 0;
}